Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/dingo annual demand nans #402

Merged
merged 7 commits into from
Jul 11, 2024
Merged

Conversation

joda9
Copy link
Collaborator

@joda9 joda9 commented Jul 8, 2024

Description

This pull request introduces a check for missing annual consumption data in the loads dataframe. This check is necessary because the ding0 network no longer provides the annual demand, which can lead to issues in subsequent processes.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • New and adjusted code is formatted using the pre-commit hooks
  • New and adjusted code includes type hinting now
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The Read the Docs documentation is compiling correctly
  • If new packages are needed, I added them the setup.py, and if needed the rtd_requirements.txt, the eDisGo_env.yml and the eDisGo_env_dev.yml.
  • I have added new features to the corresponding whatsnew file

Detailed Changes

  1. Added Check for Missing Annual Consumption Data:
    • Implemented a check to raise an AttributeError if the annual consumption data is missing in the loads dataframe, ensuring data completeness and preventing downstream errors.
    if not all(loads_df.annual_consumption.notnull()):
        raise AttributeError(
            "The annual consumption of some loads is missing. Please provide "
        )

These changes ensure data validation processes function correctly, enhancing the stability and reliability of the code.

@joda9 joda9 requested a review from birgits July 8, 2024 10:17
@birgits birgits merged commit a65ccdf into dev Jul 11, 2024
7 checks passed
@birgits birgits deleted the bugfix/dingo-annual-demand-nans branch July 11, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants